package id.co.rho.scoring.cid.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "SCRCID_MODEL")
public class Model implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Long id;
	private Integer revision;
	private String modelName;
	private String typeModelConfig;
	private Date createdDate;
	private List<Criteria> criteries = new ArrayList<Criteria>();
	private Boolean aktifStatus;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getRevision() {
		return revision;
	}

	public void setRevision(Integer revision) {
		this.revision = revision;
	}

	public String getModelName() {
		return modelName;
	}

	public void setModelName(String modelName) {
		this.modelName = modelName;
	}

	public String getTypeModelConfig() {
		return typeModelConfig;
	}

	public void setTypeModelConfig(String typeModelConfig) {
		this.typeModelConfig = typeModelConfig;
	}

	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	@OneToMany(cascade = CascadeType.ALL)
	public List<Criteria> getCriteries() {
		return criteries;
	}

	public void setCriteries(List<Criteria> criteries) {
		this.criteries = criteries;
	}

	public Boolean getAktifStatus() {
		return aktifStatus;
	}

	public void setAktifStatus(Boolean aktifStatus) {
		this.aktifStatus = aktifStatus;
	}
	
	

}
